package com.systemframework.util;

import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.extra.qrcode.QrConfig;
import com.systemframework.enums.ImageTypeEnum;

/**
 * @author summer
 * @date 2023-03-16 17:56
 */
public class QrCode {

    public static String sendCode(String text, Integer width, Integer height, ImageTypeEnum typeEnum){
        QrConfig qrConfig=new QrConfig(width,height);
        return QrCodeUtil.generateAsBase64(text,qrConfig,typeEnum.name());
    }
}
